<template>
  <div
    class="shadow"
    v-if="modelValue"
    @click.self="$emit('update:modelValue', !modelValue)"
  >
    <div class="dialogBox">
      <span @click.self="$emit('update:modelValue', !modelValue)">X</span>
    </div>
  </div>
</template>

<script setup lang="ts">
defineProps(['modelValue'])
defineEmits(['update:modelValue'])
</script>

<style lang="scss" scoped>
.shadow {
  width: 100%;
  height: 93%;
  background-color: rgba(127, 127, 127, 0.5);
  overflow: hidden;
}
.dialogBox {
  width: 500px;
  height: 500px;
  background-color: white;
  margin: 50px auto;
  position: relative;

  span {
    position: absolute;
    right: 0;
    top: 0;
    cursor: pointer;
  }
}
</style>
